<template>
  <el-container class="layout-container-demo">
    <el-aside width="200px">
      <el-menu
        :default-openeds="['1', '3']"
        router
        active-text-color="#ffd04b"
        background-color="#545c64"
        text-color="#fff"
      >
        <el-sub-menu index="1">
          <template #title>
            <el-icon><message /></el-icon>账户管理
          </template>
          <el-menu-item index="/">首页</el-menu-item>
          <el-menu-item index="/about">about</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="2">
          <template #title>
            <el-icon><icon-menu /></el-icon>轮播图管理
          </template>
          <el-menu-item index="2-1">Option 1</el-menu-item>
          <el-menu-item index="2-2">Option 2</el-menu-item>
        </el-sub-menu>
        <el-sub-menu index="3">
          <template #title>
            <el-icon><setting /></el-icon>产品管理
          </template>
          <el-menu-item index="3-1">Option 1</el-menu-item>
          <el-menu-item index="3-2">Option 2</el-menu-item>
        </el-sub-menu>
      </el-menu>
    </el-aside>

    <el-container>
      <el-header style="text-align: right; font-size: 12px">
        <h3>千锋管理系统</h3>
        <span>Tom</span>
      </el-header>

      <el-main>
        <RouterView></RouterView>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import { Menu as IconMenu, Message, Setting } from "@element-plus/icons-vue";
export default {
  components: {
    IconMenu,
    Message,
    Setting,
  },
};
</script>

<style>
html,
body,
#app,
.el-container,
.el-aside {
  height: 100vh;
}
.el-aside {
  background-color: #545c64;
}
</style>
